// app/unmatched.js
import { View, Text, ActivityIndicator } from 'react-native';
import { router } from 'expo-router';
import { useEffect } from 'react';

const UnmatchedRoute = () => {
    useEffect(() => {
        // 在组件挂载后，延迟几秒后进行重定向
        const timer = setTimeout(() => {
            router.push('/home');
        }, 1000); // 延迟 1 秒

        // 清除定时器以防内存泄漏
        return () => clearTimeout(timer);
    }, []);

    return (
        <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
            <Text>正在加载中，请耐心等待...</Text>
            <ActivityIndicator size="large" />
        </View>
    );
};

export default UnmatchedRoute;
